package com.app.allwe.gui.text;

import javax.swing.*;
import java.awt.*;

public class TextLabel extends JLabel {

    public TextLabel(String text, int horizontalAlignment) {
        super(text, horizontalAlignment);
    }

    public static TextLabel createTextLabel(String text) {
        TextLabel textLabel = new TextLabel("", JLabel.CENTER);
        textLabel.setText(text);
        textLabel.setFont(new Font("Serif", Font.BOLD, 150));   // 定义字体
        textLabel.setForeground(new Color(0, 255, 255));    // 设置颜色
        return textLabel;
    }
}
